package ie.timalb.chess.main.core.grid;

public class CellLocation {
	private int coordinateX;
	private int coordinateY;

	public CellLocation(int coordX, int coordY) {
		setCoordinateX(coordX);
		setCoordinateY(coordY);
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof CellLocation){
			CellLocation tmp = (CellLocation) obj;
			return	(
						(tmp.getCoordinateX() == this.getCoordinateX()) &&
						(tmp.getCoordinateY() == this.getCoordinateY())
					);
			
		}else{
			return super.equals(obj);
		}		
	}

	public int getCoordinateX() {
		return coordinateX;
	}

	private void setCoordinateX(int coordinateX) {
		this.coordinateX = coordinateX;
	}

	public int getCoordinateY() {
		return coordinateY;
	}

	private void setCoordinateY(int coordinateY) {
		this.coordinateY = coordinateY;
	}	
}
